import { uniFetch  } from '../utils/Ajax'
import {uniConfig} from '../config/index'
const uniPost = uniFetch.uniPost
const checkLogin = params => {
  return uniPost(
    {
      query: {
        ...params
      }
    },
    uniConfig.prodPath + '/wx/open/get'
  )
}
const bindMobileByWx = params => {
  return uniPost(
    {
      query: {
        ...params
      }
    },
    uniConfig.prodPath + '/wxmini/bindMobile'
  )
}

//修改用户昵称和头像
const updateInfo = params => {
  return uniPost(
    {
      query: {
        ...params
      }
    },
    uniConfig.prodPath + "/wxmini/modifyMemberInfo"
  )
}

export {
  checkLogin,
  bindMobileByWx,
  updateInfo
}
